abstract class Animal{
    name:string
    constructor(name:string){
        this.name=name
    }
    sayName(){
        console.log('父类的方法');
        
    }
}
class Pig extends Animal{
    constructor(name:string){
        super(name)
    }
    sayName(){
        return 110
    }
}

const per=new Pig('猪')
per.sayName()
console.log(per);
